<?php

namespace app\admin\controller;

use app\admin\controller\Base;
use app\admin\service\RoleService;
use app\admin\service\UserService;
class User extends Base
{
    public function info(){
        $user['username']   = $this->user->username;
        $user['phone']      = $this->user->phone;
        $user['user_id']    = $this->user->user_id;
        $user['role']       = UserService::getRolesByIDs($this->user->user_id);
        $user['router']     = RoleService::generateRouterByRoleInfo($user['role']);
//        $user['pages']      = $pages;
//        $user['funcs']        = $funcs;
        return json_ok($user);
    }
}
